package com.ruoyi.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finance.mapper.InvoiceTypesMapper;
import com.ruoyi.finance.domain.InvoiceTypes;
import com.ruoyi.finance.service.IInvoiceTypesService;

/**
 * 发票种类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-26
 */
@Service
public class InvoiceTypesServiceImpl implements IInvoiceTypesService 
{
    @Autowired
    private InvoiceTypesMapper invoiceTypesMapper;

    /**
     * 查询发票种类
     * 
     * @param id 发票种类主键
     * @return 发票种类
     */
    @Override
    public InvoiceTypes selectInvoiceTypesById(Long id)
    {
        return invoiceTypesMapper.selectInvoiceTypesById(id);
    }

    /**
     * 查询发票种类列表
     * 
     * @param invoiceTypes 发票种类
     * @return 发票种类
     */
    @Override
    public List<InvoiceTypes> selectInvoiceTypesList(InvoiceTypes invoiceTypes)
    {
        return invoiceTypesMapper.selectInvoiceTypesList(invoiceTypes);
    }

    /**
     * 新增发票种类
     * 
     * @param invoiceTypes 发票种类
     * @return 结果
     */
    @Override
    public int insertInvoiceTypes(InvoiceTypes invoiceTypes)
    {
        return invoiceTypesMapper.insertInvoiceTypes(invoiceTypes);
    }

    /**
     * 修改发票种类
     * 
     * @param invoiceTypes 发票种类
     * @return 结果
     */
    @Override
    public int updateInvoiceTypes(InvoiceTypes invoiceTypes)
    {
        return invoiceTypesMapper.updateInvoiceTypes(invoiceTypes);
    }

    /**
     * 批量删除发票种类
     * 
     * @param ids 需要删除的发票种类主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceTypesByIds(Long[] ids)
    {
        return invoiceTypesMapper.deleteInvoiceTypesByIds(ids);
    }

    /**
     * 删除发票种类信息
     * 
     * @param id 发票种类主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceTypesById(Long id)
    {
        return invoiceTypesMapper.deleteInvoiceTypesById(id);
    }
}
